#include "Algorithm.h"
#include "KMPStringMatch.h"
#include "Sort.h"

#include <iostream>

using namespace JorenAlgorithm;
using namespace std;

int main()
{
	//char* masterStr="IamJoorren";
	//char* modeStr="Joorr";
	//Algorithm *match=new KMPStringMatch(masterStr,modeStr);
	//int at=match->run();
	//if(at)
	//	cout<<"Successfully matching with the substring at:"<<at<<endl;
	//else
	//	cout<<"Cannot find the substring!"<<endl;

	int source[6]={5,4,3,7,8,6};
	int len=6;
	Sort::SORTMETHOD method=Sort::INSERTSORT;
	Sort * sort=new Sort(method, source, len);
	sort->print();
	sort->run();
	sort->print();

	int source2[6]={5,4,3,7,8,6};
	sort->setSource(source2);
	sort->setMethod(Sort::MERGING);
	sort->print();
	sort->run();
	sort->print();

	return 0;
}